import { Library } from "@/api/service/library/types";

const formObj: Library = {
  resId: "",
  name: "",
  type: "0",
  lang: "zh",
  word: "",
  uri: "",
  md5: "",
  format: "",
  bytes: 0,
  deptId: "",
  sizeId: "",
  createBy: "",
  createTime: "",
  share: "1",
  status: "1",
  oss: "0",
  cover: "",
  mode: "0"
};
export const libraryForm = ref<Library>({
  ...formObj
});

/* 保留素材尺寸 */
let tempSizeId = "";
export const showLibraryForm = ref(false);
export const resetLibraryForm = () => {
  tempSizeId = libraryForm.value.sizeId;
  libraryForm.value = {
    ...formObj
  };
  libraryForm.value.sizeId = tempSizeId;
};
